<?php
	require_once "dvr.php";
	$op = $_GET['do'];
	if($op == 'getsilent')
	{
		$strvalue = $_GET['value'];
		$strvalue = TranslateString($strvalue);
		$value_array = BuildArraybyString($strvalue);
		$macaddr = GetArrVarbyKey('mymac',$value_array);
		if(!$macaddr)
		{
			echo 'FAIL:Need mac address!';
			exit;
		}
		$macaddr = MacCheck($macaddr);
		if(!$macaddr)
		{
			echo 'FAIL:Invalid mac address <'.$macaddr.'>';
			exit;
		}
		$sql    = 'SELECT dns_mac,dns_ip,dns_name,dns_online,dns_update FROM dns_info WHERE dns_macbind  && dns_mac = "'.MacCheck($macaddr).'"';
		$result = mysql_query($sql, $link);
		if (!$result)
		{
			echo "DB Error, could not query the database\n";
			echo 'MySQL Error: ' . mysql_error();
			exit;
		}
		$rows = mysql_fetch_array ($result,MYSQL_ASSOC);
		if(!$rows)
		{
			echo 'FAIL';
		}
		else
		{
			$DNSSvrname = svrname;
			echo 'SUCC:'.$rows['dns_name'].'.'.svrname.':';
		}
		mysql_free_result($result);
	}
?>